This proposal is a competing continuation of an award that significantly advanced our understanding of sleep abnormalities associated with cocaine dependence. In the initial award, rigorous studies of polysomnographically measured sleep identified a characteristic pattern of insomnia in abstinent cocaine users, with evidence for worsening sleep as abstinence progressed. The finding of impaired sleep introduced the possibility that a treatment aimed at correcting the sleep abnormality or the consequences of poor sleep might improve clinical outcomes in the treatment of cocaine dependence. The first renewal of the award tested the hypothesis that the stimulant modafinil, shown previously to be effective in reducing cocaine use in chronic users, would improve some of the consequences of poor sleep such as excessive daytime sleepiness. In addition to decreasing both objective and subjective measures of sleepiness, however, modafinil had striking and unprecedented effects on sleep architecture. Specifically, modafinil decreased latency to sleep onset, increased total sleep time, and increased slow-wave sleep time to normal levels. The current proposal aims to test the hypothesis that these improvements in sleep mediate improved clinical outcome, and so introduce sleep improvement as an essential part of the treatment of cocaine dependence. To do so, a translational trial is proposed, where a randomized, controlled trial of modafinil is coupled with polysomnographic measurement of sleep in a relapse reduction study design. This study will directly examine the relationship between slow-wave sleep and other sleep parameters to clinical outcome, with modafinil serving as a modulator of sleep. It is hypothesized that modafinil will improve clinical outcome, and that this improvement will be significantly mediated by its effects on sleep. In addition, it is hypothesized that sleep outcomes will independently predict clinical outcome. If confirmed, these hypotheses will provide a neurophysiological explanation for the effectiveness of modafinil and contribute to the development of new treatments for stimulant dependence.